package com.example.myone;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class WelcomeActivity extends AppCompatActivity {

    /**
     * 欢迎页
     */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        /*SharedPreferences sharedPreferences=getSharedPreferences("key",MODE_PRIVATE);
       boolean b=  sharedPreferences.getBoolean("add",false);
*/
        //判断是否是第一次进入引导页

            new Handler(new Handler.Callback() {
                @Override
                public boolean handleMessage(Message message) {

                    startActivity(new Intent(WelcomeActivity.this, HomeActivity.class));

                    return false;
                }
            }).sendEmptyMessageDelayed(0, 2000);

        }


}
